<%@ page language="java" pageEncoding="UTF-8"%>

<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %>
<%@ taglib uri="http://struts.apache.org/tags-logic" prefix="logic" %>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html:html lang="true">
	<head>
		<html:base />
		<title>Personal information</title>
		<link href="form/login.css" rel="stylesheet" type="text/css">
	</head>
	<body>
		<logic:notPresent name="userid" scope="session">
           	<logic:redirect forward="login_error"></logic:redirect>
		</logic:notPresent>
		<div class="container">
			<div class="header">
				<html:img page="/yssz.jpg"/>
				<div id="login">
					<html:link action="mainPre">main page</html:link>
				</div>
			</div>
			<div class="content">
				<h1>Personal Information</h1>
				<p>
					name : <bean:write name="user" property="name" scope="request"/><br>
					<logic:notPresent name="admin" scope="session">
						birthday : <bean:write name="user" property="birthday" scope="request"/><br>
						email : <bean:write name="user" property="email" scope="request"/><br>
						role : 
						<logic:match name="user" property="doctor" value="true">doctor</logic:match>
						<logic:match name="user" property="doctor" value="false">patient</logic:match><br>
						<logic:present name="ban" scope="session">
							<logic:present name="user" property="bantime" scope="request">
								banned until: <bean:write name="user" property="bantime" scope="request"/>
							</logic:present>
							<logic:notPresent name="user" property="bantime" scope="request">
								banned forever.
							</logic:notPresent><br>
						</logic:present>
						topics : <bean:write name="count_topic" scope="request"/><br>
						posts : <bean:write name="count_poster" scope="request"/><br>
						<html:link action="viewFollow">view followed groups</html:link>
						<html:link action="viewIllness">view illness records</html:link>
					</logic:notPresent>
					<logic:present name="admin" scope="session">
					administrator<br>
					</logic:present>
				</p>
			</div>
			<div class="footer">
				<p>copyright@yssz</p>
			</div>
		</div>
	</body>
</html:html>
